package com.enseirb.bdxmap.converter;

import java.util.List;

import com.enseirb.bdxmap.dao.RestroomMarkerDAO;
import com.enseirb.bdxmap.dao.dto.RestroomMarkerDTO;
import com.enseirb.bdxmap.exception.BdxMapException;
import com.enseirb.bdxmap.service.model.RestroomMarkerBO;

public class RestroomMarkerConverter extends AbstractMarkerConverter<RestroomMarkerDTO, RestroomMarkerBO> {
	
	private RestroomMarkerDAO restroomDAO = new RestroomMarkerDAO();
	
	@Override
	protected List<RestroomMarkerDTO> getDataFromDAO() throws BdxMapException {
		return restroomDAO.getData();
	}
	
	@Override
	protected RestroomMarkerBO newMarkerBO() {
		return new RestroomMarkerBO();
	}
	
	@Override
	protected RestroomMarkerBO setCustomFieldsBO(RestroomMarkerDTO restroomDTO, RestroomMarkerBO restroomBO) {
		restroomBO.typology = restroomDTO.typology;
		restroomBO.options = restroomDTO.options;
		return restroomBO;
	}

}
